<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .banner {
        background: url(https://picsum.photos/800/200);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        width: 100%;
        height: 30vh;
        position: relative;
        /* filter: grayscale(100%); */
      }
      .mask {
        backdrop-filter: blur(5px) grayscale(1);
        position: absolute;
        transition: all 0.5s ease-in-out;
        top:0;right:0;
        width: 100%;
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div class="banner">
      <div class="mask"></div>
    </div>
    <script>
      const banner = document.querySelector(".banner");
      const mask = document.querySelector(".mask");
      let intervalId = null;
      let width = 0;
      banner.addEventListener("mouseenter", () => {
        mask.style.width = `${0}%`;
        mask.style.borderLeft = "1px solid #ccc";
      });
      banner.addEventListener("mouseleave", () => {
        mask.style.width = `${100}%`;
        mask.style.borderRight = "none";
      });
    </script>
  </body>
</html>
